package com.mj.haier.calc.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import javax.validation.constraints.*;

import org.springframework.data.elasticsearch.annotations.Document;
import java.io.Serializable;
import java.time.Instant;
import java.util.Objects;

/**
 * The AzEorderTitleErrorInfo entity.
 * 同步源安装订单错误信息， 自增主键
 * @author ycm
 */
@ApiModel(description = "The AzEorderTitleErrorInfo entity. 同步源安装订单错误信息， 自增主键 @author ycm")
@Entity
@Table(name = "az_eorder_title_error")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "azeordertitleerror")
public class AzEorderTitleError implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 工单编号, 唯一
     */
    @NotNull
    @ApiModelProperty(value = "工单编号, 唯一", required = true)
    @Column(name = "order_code", nullable = false)
    private String orderCode;

    /**
     * 工贸编码, 分表键
     */
    @NotNull
    @ApiModelProperty(value = "工贸编码, 分表键", required = true)
    @Column(name = "trade_code", nullable = false)
    private String tradeCode;

    /**
     * 网点结单时间
     */
    @ApiModelProperty(value = "网点结单时间")
    @Column(name = "server_close_time")
    private Instant serverCloseTime;

    /**
     * 订单json明细， 可通过反编译重新生成订单对象
     */
    @ApiModelProperty(value = "订单json明细， 可通过反编译重新生成订单对象")
    @Column(name = "eorder_title_json")
    private String eorderTitleJson;

    /**
     * 是否特殊处理， 0: 不处理，默认; 1: 处理; 2: 处理完成
     */
    @ApiModelProperty(value = "是否特殊处理， 0: 不处理，默认; 1: 处理; 2: 处理完成")
    @Column(name = "is_deal")
    private String isDeal;

    /**
     * 处理时间
     */
    @ApiModelProperty(value = "处理时间")
    @Column(name = "deal_time")
    private Instant dealTime;

    /**
     * 处理描述
     */
    @ApiModelProperty(value = "处理描述")
    @Column(name = "deal_msg")
    private String dealMsg;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Column(name = "remark")
    private String remark;

    @Column(name = "gmt_modified")
    private Instant gmtModified;

    @Column(name = "modified_user")
    private String modifiedUser;

    @Column(name = "gmt_create")
    private Instant gmtCreate;

    @Column(name = "create_user")
    private String createUser;

    /**
     * 备用字段 add1
     */
    @ApiModelProperty(value = "备用字段 add1")
    @Column(name = "add_1")
    private String add1;

    /**
     * 备用字段 add2
     */
    @ApiModelProperty(value = "备用字段 add2")
    @Column(name = "add_2")
    private String add2;

    /**
     * 备用字段 add3
     */
    @ApiModelProperty(value = "备用字段 add3")
    @Column(name = "add_3")
    private String add3;

    /**
     * 备用字段 add4
     */
    @ApiModelProperty(value = "备用字段 add4")
    @Column(name = "add_4")
    private String add4;

    /**
     * 备用字段 add5
     */
    @ApiModelProperty(value = "备用字段 add5")
    @Column(name = "add_5")
    private String add5;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public AzEorderTitleError orderCode(String orderCode) {
        this.orderCode = orderCode;
        return this;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getTradeCode() {
        return tradeCode;
    }

    public AzEorderTitleError tradeCode(String tradeCode) {
        this.tradeCode = tradeCode;
        return this;
    }

    public void setTradeCode(String tradeCode) {
        this.tradeCode = tradeCode;
    }

    public Instant getServerCloseTime() {
        return serverCloseTime;
    }

    public AzEorderTitleError serverCloseTime(Instant serverCloseTime) {
        this.serverCloseTime = serverCloseTime;
        return this;
    }

    public void setServerCloseTime(Instant serverCloseTime) {
        this.serverCloseTime = serverCloseTime;
    }

    public String getEorderTitleJson() {
        return eorderTitleJson;
    }

    public AzEorderTitleError eorderTitleJson(String eorderTitleJson) {
        this.eorderTitleJson = eorderTitleJson;
        return this;
    }

    public void setEorderTitleJson(String eorderTitleJson) {
        this.eorderTitleJson = eorderTitleJson;
    }

    public String getIsDeal() {
        return isDeal;
    }

    public AzEorderTitleError isDeal(String isDeal) {
        this.isDeal = isDeal;
        return this;
    }

    public void setIsDeal(String isDeal) {
        this.isDeal = isDeal;
    }

    public Instant getDealTime() {
        return dealTime;
    }

    public AzEorderTitleError dealTime(Instant dealTime) {
        this.dealTime = dealTime;
        return this;
    }

    public void setDealTime(Instant dealTime) {
        this.dealTime = dealTime;
    }

    public String getDealMsg() {
        return dealMsg;
    }

    public AzEorderTitleError dealMsg(String dealMsg) {
        this.dealMsg = dealMsg;
        return this;
    }

    public void setDealMsg(String dealMsg) {
        this.dealMsg = dealMsg;
    }

    public String getRemark() {
        return remark;
    }

    public AzEorderTitleError remark(String remark) {
        this.remark = remark;
        return this;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Instant getGmtModified() {
        return gmtModified;
    }

    public AzEorderTitleError gmtModified(Instant gmtModified) {
        this.gmtModified = gmtModified;
        return this;
    }

    public void setGmtModified(Instant gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getModifiedUser() {
        return modifiedUser;
    }

    public AzEorderTitleError modifiedUser(String modifiedUser) {
        this.modifiedUser = modifiedUser;
        return this;
    }

    public void setModifiedUser(String modifiedUser) {
        this.modifiedUser = modifiedUser;
    }

    public Instant getGmtCreate() {
        return gmtCreate;
    }

    public AzEorderTitleError gmtCreate(Instant gmtCreate) {
        this.gmtCreate = gmtCreate;
        return this;
    }

    public void setGmtCreate(Instant gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public String getCreateUser() {
        return createUser;
    }

    public AzEorderTitleError createUser(String createUser) {
        this.createUser = createUser;
        return this;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getAdd1() {
        return add1;
    }

    public AzEorderTitleError add1(String add1) {
        this.add1 = add1;
        return this;
    }

    public void setAdd1(String add1) {
        this.add1 = add1;
    }

    public String getAdd2() {
        return add2;
    }

    public AzEorderTitleError add2(String add2) {
        this.add2 = add2;
        return this;
    }

    public void setAdd2(String add2) {
        this.add2 = add2;
    }

    public String getAdd3() {
        return add3;
    }

    public AzEorderTitleError add3(String add3) {
        this.add3 = add3;
        return this;
    }

    public void setAdd3(String add3) {
        this.add3 = add3;
    }

    public String getAdd4() {
        return add4;
    }

    public AzEorderTitleError add4(String add4) {
        this.add4 = add4;
        return this;
    }

    public void setAdd4(String add4) {
        this.add4 = add4;
    }

    public String getAdd5() {
        return add5;
    }

    public AzEorderTitleError add5(String add5) {
        this.add5 = add5;
        return this;
    }

    public void setAdd5(String add5) {
        this.add5 = add5;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AzEorderTitleError azEorderTitleError = (AzEorderTitleError) o;
        if (azEorderTitleError.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), azEorderTitleError.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "AzEorderTitleError{" +
            "id=" + getId() +
            ", orderCode='" + getOrderCode() + "'" +
            ", tradeCode='" + getTradeCode() + "'" +
            ", serverCloseTime='" + getServerCloseTime() + "'" +
            ", eorderTitleJson='" + getEorderTitleJson() + "'" +
            ", isDeal='" + getIsDeal() + "'" +
            ", dealTime='" + getDealTime() + "'" +
            ", dealMsg='" + getDealMsg() + "'" +
            ", remark='" + getRemark() + "'" +
            ", gmtModified='" + getGmtModified() + "'" +
            ", modifiedUser='" + getModifiedUser() + "'" +
            ", gmtCreate='" + getGmtCreate() + "'" +
            ", createUser='" + getCreateUser() + "'" +
            ", add1='" + getAdd1() + "'" +
            ", add2='" + getAdd2() + "'" +
            ", add3='" + getAdd3() + "'" +
            ", add4='" + getAdd4() + "'" +
            ", add5='" + getAdd5() + "'" +
            "}";
    }
}
